package com.engine.salary.service;

import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
import com.engine.salary.entity.siarchives.param.SIArchiveImportParam;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO;
import com.engine.salary.entity.sischeme.dto.InsuranceSchemeListDTO;
import com.engine.salary.entity.sischeme.param.InsuranceSchemeDetailUpdateParam;
import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam;
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
import com.engine.salary.entity.sischeme.po.InsuranceSchemePO;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;
import java.util.Map;

/**
 * @Author weaver_cl
 * @Description:
 * @Date 2022/3/7
 * @Version V1.0
 **/
public interface SISchemeService {

    Map<String, Object> getForm(Map<String, Object> params);

    Map<String, Object> insertScheme(Map<String, Object> params);

    String update(Map<String, Object> params);

    Map<String, Object> delete(Map<String, Object> params);

    Map<String, Object> copyScheme(Map<String, Object> params);

    List<InsuranceSchemeDetailPO> queryListByInsuranceIdIsPayment(Long insuranceId, Integer isPayment);

    Map<String, Object> listPage(Map<String, Object> params);

    /**
     * 获取当前租户下所有的方案id和方案名称的map
     * @return Map
     */
    Map<Long, String> getSchemeIdNameMap();

    /**
     * 获取方案列表
     * @param param
     * @return
     */
    PageInfo<InsuranceSchemeListDTO> list(InsuranceSchemeParam param);

    List<InsuranceArchivesEmployeePO> listPageEmployeePOS(InsuranceArchivesListParam param);

    List<Map<String, Object>> buildTableData(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS);

    XSSFWorkbook export(InsuranceArchivesListParam param);

    /**
     * 获取方案名称
     *
     * @param schemeId 方案主键id
     * @return string
     */
    String querySchemeName(Long schemeId);

    List<WeaTableColumn> buildWeaTableColumns(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, Long employeeId);

    Map<String, Object> preview(SIArchiveImportParam param);

    Map<String, Object> batchImportEbatch(SIArchiveImportParam param);

    XSSFWorkbook exportTemplate(InsuranceArchivesListParam param);

    Map<String, Object> checkSIArchiveAdd(SIArchiveImportParam param);

    Map<String, Object> addSIArchive(SIArchiveImportParam param);

    /**
     * 编辑方案明细表数据
     * @param schemeDetailList
     */
    List<String> updateSchemeDetail(List<InsuranceSchemeDetailUpdateParam> schemeDetailList);

    List<InsuranceSchemePO> listAll();
}
